#include "SMPPBroadcastFrequencyInterval.hpp"

using namespace smpp::pdu;

BroadcastFrequencyInterval::BroadcastFrequencyInterval(
const octetString &nValue):
TLV(TLVtags::TAG_BROADCAST_FREQUENCY_INTERVAL,nValue.size()),_Value(nValue){}

BroadcastFrequencyInterval::BroadcastFrequencyInterval(
const BroadcastFrequencyInterval &nBroadcastFrequencyInterval):
TLV(nBroadcastFrequencyInterval),
_Value(nBroadcastFrequencyInterval.getValue()){}

bool BroadcastFrequencyInterval::operator ==(
	const BroadcastFrequencyInterval &nBroadcastFrequencyInterval) const{
	return (TLV::operator == (nBroadcastFrequencyInterval) && 
			_Value == nBroadcastFrequencyInterval.getValue());
}

bool BroadcastFrequencyInterval::operator !=(
	const BroadcastFrequencyInterval &nBroadcastFrequencyInterval) const{
	return !this->operator == (nBroadcastFrequencyInterval);
}

BroadcastFrequencyInterval &BroadcastFrequencyInterval::operator = (
	const BroadcastFrequencyInterval &nBroadcastFrequencyInterval){
	if(*this == nBroadcastFrequencyInterval)
		return *this;
	TLV::operator = (nBroadcastFrequencyInterval);
	_Value = nBroadcastFrequencyInterval.getValue();
	return *this;
}

void BroadcastFrequencyInterval::setValue(const octetString &nValue){
	_Value = nValue;
}

const octetString &BroadcastFrequencyInterval::getValue() const{
	return _Value;
}
